<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
Route::group('api',function(){

    // +----------------------------------------------------------------------
    // | 登录注册
    // +----------------------------------------------------------------------
    Route::group('login',function(){
        Route::post('login','api/login/login');//登录
        Route::post('register','api/login/register');//注册
        Route::post('forget','api/login/forget');//忘记密码
    });


    // +----------------------------------------------------------------------
    // | 首页
    // +----------------------------------------------------------------------
    Route::group('index',function(){
        Route::get('banner','api/index/banner');//轮播图
        Route::get('category','api/index/category');//分类
        Route::get('home','api/index/home');//推荐店铺
        Route::get('recommend','api/index/recommend');//推荐新菜新店
        Route::get('search','api/index/search');//搜索
        Route::get('searchgoods','api/index/searchgoods');//搜索商品
        Route::get('about','api/index/about');//关于我们
        Route::get('contact','api/index/contact');//联系客服
        //
    });
    // +----------------------------------------------------------------------
    // | 店铺
    // +----------------------------------------------------------------------
    Route::group('shop',function(){
        Route::get('index','api/shop/index');//店铺列表
        Route::post('detail','api/shop/detail');//店铺详情
        Route::post('comment','api/shop/comment');//店铺评论
        Route::post('info','api/shop/info');//店铺信息
        Route::post('qualifications','api/shop/qualifications');//店铺资质
        Route::post('collect','api/shop/collect');//店铺收藏与取消
        //
    });
    // +----------------------------------------------------------------------
    // | 我的
    // +----------------------------------------------------------------------
    Route::group('member',function(){
        Route::get('join','api/member/join');//加盟合作
        Route::post('settled','api/member/settled');//立即入驻
        Route::post('apply','api/member/apply');//提交审核
        Route::post('uploadimage','api/member/uploadimage');//上传证件
        Route::post('index','api/member/index');//个人中心
        Route::post('mycollect','api/member/mycollect');//我的收藏
        Route::post('bind','api/member/bind');//绑定手机

        //
    });
    // +----------------------------------------------------------------------
    // | 商户端
    // +----------------------------------------------------------------------
    Route::group('system',function(){
        Route::get('merchantlogin','api/system/merchantlogin');//商户密码登录
        Route::post('login','api/system/login');//商户手机验证码登录
        Route::post('open','api/system/open');//开店关店
        Route::post('category','api/system/category');//店内分类
        Route::post('category_edit','api/system/category_edit');//添加修改分类
        Route::post('category_del','api/system/category_del');//删除分类
        Route::post('goods','api/system/goods');//商品列表
        Route::post('goods_edit','api/system/goods_edit');//商品添加或者修改
        Route::post('set_password','api/system/set_password');//设置密码
        Route::post('bind','api/system/bind');//改绑手机
        Route::post('goods_detail','api/system/goods_detail');//商品详情
        Route::post('opentime','api/system/opentime');//设置营业时间
        Route::post('tell','api/system/tell');//设置订餐电话
        Route::post('des','api/system/des');//设置店简介
        Route::post('book','api/system/book');//设置预订单
        Route::post('images','api/system/images');//设置店铺图片
        Route::post('auth','api/system/auth');//设置营业资质
        Route::post('comment','api/system/comment');//店铺评论
        Route::post('reply','api/system/reply');//店铺评论回复
    });
    // +----------------------------------------------------------------------
    // | 订单
    // +----------------------------------------------------------------------
    Route::group('order',function(){
        Route::post('comment','api/Order/comment');//提交评论
        Route::post('comment_image','api/Order/commentImage');//提交评论图片
        Route::post('before','api/Order/commentbefore');//评论之前显示菜单
        Route::post('placeOrder','api/Order/placeOrder');//下单
        Route::post('index','api/Order/index');//订单列表
        Route::post('detail','api/Order/detail');//订单详情
        Route::post('pay','api/Order/pay');//去买单
    });
});
